package models

import (
	"go-admin/common/models"
	"time"
)

type SysLocation struct {
	models.Model
	ChannelId    string    `json:"channelId" gorm:"type:varchar(50);comment:通道ID"`
	DeviceId     string    `json:"deviceId" gorm:"type:varchar(50);comment:设备ID"`
	LocationTime time.Time `json:"locationTime" gorm:"type:datetime;comment:定位时间"`
	Longitude    float64   `json:"longitude" gorm:"type:double;comment:经度"`
	Latitude     float64   `json:"latitude" gorm:"type:double;comment:纬度"`
	Speed        float64   `json:"speed" gorm:"type:double;comment:速度"`
	Direction    float64   `json:"direction" gorm:"type:double;comment:方向"`
	Altitude     float64   `json:"altitude" gorm:"type:double;comment:海拔"`
	Location     string    `json:"location" gorm:"type:varchar(500);comment:地理位置"`
	models.ModelTime
	models.ControlBy
}

func (SysLocation) TableName() string {
	return "sys_location"
}

func (e *SysLocation) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *SysLocation) GetId() interface{} {
	return e.Id
}
